package main

import (
	"log"
	"time"

	"gitee.com/z1gotool/z1log"
)

func main() {

	log.Println("----------test split line,TestLog-----------")
	_ = time.Now()
	_ = z1log.OUTPUT_TYPE_STDOUT

	{

		// log.Println("----------z1log,1-----------")
		// z1log.SetLog(
		// 	z1log.DEBUG,
		// 	"logs/app.log",
		// 	z1log.EveryMinute,
		// 	false,
		// 	z1log.OUTPUT_TYPE_STDOUT,
		// )
		// z1log.Debug("This is a debug message, z1log.OUTPUT_TYPE_STDOUT")
		// z1log.Info("This is an info message, z1log.OUTPUT_TYPE_STDOUT")
		// z1log.Warning("This is a warning message, z1log.OUTPUT_TYPE_STDOUT")
		// z1log.Error("This is an error message, z1log.OUTPUT_TYPE_STDOUT", 11)
		// z1log.Errorf("This is an error message ---%v---, z1log.OUTPUT_TYPE_STDOUT", 222)

	}

	{

		// log.Println("----------z1log,2-----------")
		// z1log.SetLog(
		// 	z1log.DEBUG,
		// 	"logs/app.log",
		// 	z1log.EveryMinute,
		// 	false,
		// 	z1log.OUTPUT_TYPE_FILE,
		// )
		// z1log.Debug("This is a debug message, z1log.OUTPUT_TYPE_FILE")
		// z1log.Info("This is an info message, z1log.OUTPUT_TYPE_FILE")
		// z1log.Warning("This is a warning message, z1log.OUTPUT_TYPE_FILE")
		// z1log.Error("This is an error message, z1log.OUTPUT_TYPE_FILE", 11)
		// z1log.Errorf("This is an error message ---%v---, z1log.OUTPUT_TYPE_FILE", 222)

	}

	{

		log.Println("----------z1log,3-----------")
		z1log.SetLog(
			z1log.DEBUG,
			"logs/app.log",
			z1log.EveryMinute,
			true,
			// z1log.OUTPUT_TYPE_STDOUT,
			// z1log.OUTPUT_TYPE_FILE,
			z1log.OUTPUT_TYPE_BOTH,
		)
		for {
			time.Sleep(time.Second * 3)
			z1log.Info("This is an info message,z1log.OUTPUT_TYPE_BOTH", time.Now())
			z1log.Warning("This is an Warning message,z1log.OUTPUT_TYPE_BOTH", time.Now())
		}

	}
}
